import {request} from './http'
// const BASE_URL = 'http://192.168.0.105/api/v1'
const BASE_URL = process.env.NODE_ENV=="development"?'http://sxbiz.jlxmall.com/api/v1':'http://sxbiz.jlxmall.com/api/v1'
//获取appid
export const getAppid = data => request('post',`${BASE_URL}/GetAppid`,data)
//获取微信授权
export const wechatLogin = data => request('post',`${BASE_URL}/vxlogin`,data)
//首页数据
export const index = data => request('post',`${BASE_URL}/index`,data)
//搜索商品列表
/**
 * 
 * @param {*} data 
 *  admin_id: 运营商id
    center_ids: 所属分拣中心id
    is_activity: 是否为活动商品
    is_hot: 是否为热门爆品
    is_new: 是否为新品
    page: 页码
    priceOrder: 价格排序 
    salesOrder: 销量排序
    text: 国
 */
export const search = data => request('post',`${BASE_URL}/search`,data)
//商品详情
/**
 * 
 * @param {*} data 
 *  admin_id:运营商id,
    goods_id:商品id,
    group_id:所属公司id
 */
export const goodInfo = data =>request('post',`${BASE_URL}/detail`,data)
//商品添加到购物车(弃用)
export const AddCart = data =>request('post',`${BASE_URL}/AddCart`,data)
//获取购物车列表
export const CartList  = data => request('post',`${BASE_URL}/CartList`,data)
//加减购物车商品数量(弃用)
export const NumCart = data => request('post',`${BASE_URL}/NumCart`,data)
//获取购物车商品数量
export const CartNum = data => request('post',`${BASE_URL}/CartNum`,data)
//删除购物车(弃用)
export const DelCart = data => request('post',`${BASE_URL}/DelCart`,data)
//获取地址列表
export const AddressList = data => request('post',`${BASE_URL}/AddressList`,data)
//获取一级分类
export const OneCategory = data => request('post',`${BASE_URL}/OneCategory`,data)
//获取二级分类
export const TwoCategory = data => request('post',`${BASE_URL}/TwoCategory`,data)
//获取三级分类及商品
export const ThreeCategory = data => request('post',`${BASE_URL}/ThreeCategory`,data)
// //获取购物车商品数量
// export const CartNum = data => request('post',`${BASE_URL}/CartNum`,data)
//获取小区站点
export const SearchSite = data => request('post',`${BASE_URL}/SearchSite`,data)
//新增地址
export const AddAddress = data => request('post',`${BASE_URL}/AddAddress`,data)
//修改地址
export const EditAddress = data => request('post',`${BASE_URL}/EditAddress`,data)
//删除地址
export const DelAddress = data => request('post',`${BASE_URL}/DelAddress`,data)
//获取公司列表
export const CompanyList = () => request('post',`${BASE_URL}/CompanyList`,{})
//获取验证码
export const SendMsg = data => request('post',`${BASE_URL}/SendMsg`,data)
//用户注册
export const register = data => request('post',`${BASE_URL}/register`,data)
//用户登录
export const login = data => request('post',`${BASE_URL}/login`,data)
//店员列表
export const EmployeeList = data => request('post',`${BASE_URL}/EmployeeList`,data)
//店员解绑，绑定操作
export const IsAdopt = data => request('post',`${BASE_URL}/IsAdopt`,data)
//取消员工身份信息
export const RelieveEmployee = data => request('post',`${BASE_URL}/RelieveEmployee`,data)
//用户重新选择公司
export const ChoiceCompany = data => request('post',`${BASE_URL}/ChoiceCompany`,data)
//取消订单理由
export const RefundOptions = data => request('post',`${BASE_URL}/RefundOptions`,data) 
//确认取消订单
export const refund = data => request('post',`http://sxbiz.jlxmall.com/api/v1/refund`,data) 
//获取腾讯地图坐标位置
export const coordinate = data => request('get','https://apis.map.qq.com/tools/locpicker',data)
//图片上传
export const UploadImage = data => request('post',`${BASE_URL}/UploadImage`,data)
//提交退款
export const ApplyRefund = data => request('post',`${BASE_URL}/ApplyRefund`,data)
//生成订单
export const newOrder = data => request('post',`${BASE_URL}/NewOrder`,data)
//支付
export const pay = data => request('post',`${BASE_URL}/JsApi`,data)
//根据状态获取订单
export const orderList = data => request('post',`${BASE_URL}/OrderList`,data)
//个人中心状态订单数量
export const orderNum = data => request('post',`${BASE_URL}/OrderNum`,data)
//获取用户信息
export const UserInfo = data => request('post',`${BASE_URL}/UserInfo`,data)
//订单收货
export const GoodsReceipt = data => request('post',`${BASE_URL}/GoodsReceipt`,data)
//评论
export const GoodsReply = data => request('post',`${BASE_URL}/GoodsReply`,data)
//获取微信分享参数
export const WxSign = data => request('post',`http://sxbiz.jlxmall.com/api/v1/WxSign`,data)
//获取配置
export const GetConfig = data => request('post',`${BASE_URL}/GetConfig`,data);
//提交本地购物车
export const editCart = data => request('post',`${BASE_URL}/editCart`,data)
//订单商品总量统计
export const OrderStatistics = data => request('post',`${BASE_URL}/OrderStatistics`,data)